//using System;
//using FireStarterModeller.BO;
//using Habanero.DB;
//using MySql.Data.MySqlClient;
//using NUnit.Framework;

//namespace SchemaInfo.Test
//{
//    [TestFixture]
//    public class TestDatabaseInfo : TestBase
//    {

//        [Test]
//        public void TestInitialiseDatabaseInfo()
//        {
//            //-------------Setup Test Pack ------------------
//            //-------------Test Pre-conditions --------------
//            //-------------Execute test ---------------------
//            DBDatabase databaseInfo = new DBDatabase(_databaseConnection);
//            //-------------Test Result ----------------------
//            Assert.AreSame(_databaseConnection, databaseInfo.DatabaseConnection);
//            Assert.AreEqual(_databaseName, databaseInfo.DatabaseName);
//        }
//        [Test]
//        public void TestDatabaseExists()
//        {
//            //-------------Setup Test Pack ------------------
//            DBDatabase databaseInfo = new DBDatabase(_databaseConnection);
//            //-------------Test Pre-conditions --------------
//            //-------------Execute test ---------------------
//            string errors;
//            bool databaseExists = databaseInfo.DatabaseExists(out errors);
//            //-------------Test Result ----------------------
//            Assert.IsTrue(databaseExists, "Database should exist.");
//        }
//        [Test]
//        public void TestDatabaseDoesntExist()
//        {
//            //-------------Setup Test Pack ------------------
//            DatabaseConfig databaseConfig =
//                new DatabaseConfig("MySql", "localhost", "bobsdatabasewhichdoesntexist", "root", "root", "3306");
//            DBDatabase databaseInfo = new DBDatabase(databaseConfig.GetDatabaseConnection());
//            //-------------Test Pre-conditions -------------
//            //-------------Execute test ---------------------
//            string errors;
//            bool databaseExists = databaseInfo.DatabaseExists(out errors);
//            //-------------Test Result ----------------------
//            Assert.IsFalse(databaseExists, "Database should not exist.");
//        }
//        [Test]
//        public void TestPopulateDatabaseInfo_nullDBConnection()
//        {
//            //-------------Setup Test Pack ------------------
            

//            //-------------Test Pre-conditions --------------
//            //-------------Execute test ---------------------
//            try
//            {
//                new DBDatabase(null);
//                Assert.Fail("Should raise an error");
//            }
//            catch (ArgumentNullException ex)
//            {
//                StringAssert.Contains("databaseConnection", ex.Message);
//            }
//        }

//        [Test]
//        public void Test_OpenConnection_DatabaseDoesntExist()
//        {
//            //-------------Setup Test Pack ------------------
//            DatabaseConfig databaseConfig =
//                new DatabaseConfig("MySql", "localhost", "bobsdatabasewhichdoesntexist", "root", "root", "3306");
//            DBDatabase databaseInfo = new DBDatabase(databaseConfig.GetDatabaseConnection());

//            string errors;
//            bool databaseExists = databaseInfo.DatabaseExists(out errors);

//            //-------------Test Pre-conditions -------------
//            Assert.IsFalse(databaseExists);

//            //-------------Execute test ---------------------
//            try
//            {
//                databaseConfig.GetConnection().Open();
//                Assert.Fail("Error should be thrown");
//            }

//            //-------------Test Result ----------------------
//            catch (MySqlException ex)
//            {
//                StringAssert.Contains("Unknown database", ex.Message);
//            }
//        }

//        [Test]
//        public void TestGetTableInfo_NullWhenNoTablesExist()
//        {
//            //---------------Set up test pack-------------------
//            DBDatabase DBDatabase = new DBDatabase();
//            //---------------Assert Precondition----------------
//            Assert.AreEqual(0, DBDatabase.Tables.Count);
//            //---------------Execute Test ----------------------
//            string nonExistentTable = TestUtilsShared.GetRandomString();
//            DBTable DBTable = DBDatabase.GetTable(nonExistentTable);
//            //---------------Test Result -----------------------
//            Assert.IsNull(DBTable);
//        }

//        [Test]
//        public void TestGetTableInfo_NullIfNotFound()
//        {
//            //---------------Set up test pack-------------------
//            DBDatabase DBDatabase = new DBDatabase();

//            DBTable firstTableInfo = new DBTable {TableName = "TestTable1"};
//            DBDatabase.Tables.Add(firstTableInfo);

//            DBTable secondTableInfo = new DBTable {TableName = "TestTable2"};
//            DBDatabase.Tables.Add(secondTableInfo);
//            //---------------Assert Precondition----------------

//            //---------------Execute Test ----------------------
//            string nonExistentTable = TestUtilsShared.GetRandomString();
//            DBTable DBTable = DBDatabase.GetTable(nonExistentTable);
//            //---------------Test Result -----------------------
//            Assert.IsNull(DBTable);
//        }

//        [Test]
//        public void TestGetTableInfo_ReturnsCorrectTableInfoIfExists()
//        {
//            //---------------Set up test pack-------------------
//            DBDatabase DBDatabase = new DBDatabase();

//            DBTable firstTableInfo = new DBTable {TableName = "TestTable1"};
//            DBDatabase.Tables.Add(firstTableInfo);

//            DBTable secondTableInfo = new DBTable {TableName = "TestTable2"};
//            DBDatabase.Tables.Add(secondTableInfo);
//            //---------------Assert Precondition----------------

//            //---------------Execute Test ----------------------
//            const string existentTableName = "TestTable1";
//            DBTable foundTableInfo = DBDatabase.GetTable(existentTableName);
//            //---------------Test Result -----------------------
//            Assert.IsNotNull(foundTableInfo);
//            Assert.AreEqual(existentTableName, foundTableInfo.TableName);
//        }
//    }
//}
namespace Firestarter.DB.Schema.Test.BO
{
}